Semantics-Driven Genericity: A Sequel to the Static C++ Object-Oriented Programming Paradigm (SCOOP 2)

نویسندگان

  • Thierry Géraud
  • Roland Levillain
چکیده

Classical (unbounded) genericity in C++03 defines the interactions between generic data types and algorithms in terms of concepts. Concepts define the requirements over a type (or a parameter) by expressing constraints on its methods and dependent types (typedefs). The upcoming C++0x standard will promote concepts from abstract entities (not directly enforced by the tools) to language constructs, enabling compilers and tools to perform additional checks on generic constructs as well as enabling new features (e.g., concept-based overloading). Most modern languages support this notion of signature on generic types. However, generic types built on other types and relying on concepts—to both ensure type conformance and drive code specialization—restrain the interface and the implementation of the newly created type: specific methods and associated types not mentioned in the concept will not be part of the new type. The paradigm of concept-based genericity lacks the required semantics to transform types while retaining or adapting their intrinsic capabilities. We present a new form of semantically-enriched genericity allowing static, generic type transformations through a simple form of type introspection based on type metadata called properties. This approach relies on a new Static C++ Object-Oriented Programming (Scoop) paradigm, and is adapted to the creation of generic and efficient libraries, especially in the field of scientific computing. Our proposal uses a metaprogramming facility built into a C++ library called Static, and doesn’t require any language extension nor additional processing (preprocessor or transformation tool).

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Declarative Semantics in Object-Oriented Software Development - A Taxonomy and Survey

One of the modern paradigms to develop an application is object oriented analysis and design. In this paradigm, there are several objects and each object plays some specific roles in applications. In an application, we must distinguish between procedural semantics and declarative semantics for their implementation in a specific programming language. For the procedural semantics, we can write a ...

متن کامل

A Static C++ Object-Oriented Programming (SCOOP) Paradigm Mixing Benefits of Traditional OOP and Generic Programming

Object-oriented and generic programming are both supported in C++. The former provides high expressiveness whereas the latter leads to more efficient programs by avoiding dynamic typing. This paper presents SCOOP, a new paradigm which enables both classical objectoriented design and high performance in C++ by mixing object-oriented programming and generic programming. We show how classical and ...

متن کامل

A Static C++ Object-Oriented Programming (SCOOP) Paradigm Mixing Benefits of Traditional OOP and Generic Programming.................... 1

Object-oriented and generic programming are both supported in C++.OOP provides high expressiveness whereas GP leads to more efficient programsby avoiding dynamic typing. This paper presents SCOOP, a new paradigm whichenables both classical OO design and high performance in C++ by mixing OOPand GP. We show how classical and advanced OO features such as virtual meth-ods, multi...

متن کامل

Genus: Making Generics Object-Oriented, Expressive, and Lightweight Technical Report

The support for generic programming in modern object-oriented programming languages is awkward and lacks desirable expressive power. We introduce an expressive genericity mechanism that adds expressive power and strengthens static checking, while remaining lightweight and simple in common use cases. Like type classes and concepts, the mechanism allows existing types to model type constraints re...

متن کامل

Practical framework for contract-based concurrent object-oriented programming

CONCURRENCY, in its many variants from multithreading to multiprocessing, distributed computing, Internet applications, and Web services, has become a required component of ever more types of systems, including some that are traditionally thought of as sequential. The software industry badly needs a concurrent programming technique enjoying the same simplicity and inspiring the same confidence ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2008